// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import Mint from 'mint-ui'
import lodash from 'lodash'
import config from './config'
import VueHprose from './utils/vue-hprose'
import VueCache from './utils/vue-cache'
import VueHelper from './utils/vue-helper'
import commonFilter from './utils/common-filter.js'

// plugin lists
Vue.use(Mint)
Vue.use(Mint.Lazyload)
Vue.use(VueCache)
Vue.use(VueHprose)
Vue.use(VueHelper)

// 注册过滤器
for (let key in commonFilter) {
  Vue.filter(key, commonFilter[key])
}
// lodash
Vue.prototype._ = lodash
Vue.prototype._.config = config
/* eslint-disable no-new */
store.dispatch('setup', () => {
  window.setTimeout(() => {
    new Vue({
      el: '#app',
      router,
      store,
      template: '<App/>',
      components: { App }
    })
  }, 10)
})

